import request from '@/utils/request';
import downloader from '@/utils/downloader';
export function downloadTemplate(data) {
  return downloader({

    url: '/admin/timetable/exportExcel',
      method: 'get',
      headers: {
  
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求内容类型，根据实际需求修改
    },
    params: data,
      });
}

//批量导入系统课程
export function importClass(data) {
  return request({
    //   headers: {
  
    //   'Content-Type': 'multipart/form-data', // 设置请求内容类型，根据实际需求修改
    // },
    url: '/admin/timetable/importExcel',
    method: 'post',
    data,
  });
}
//课程分页列表
export function timetableList(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/timetable/list',
    method: 'get',
    params: data,
  });
}
//删除课程
export function timetableRemove(data) {
  return request({
    url: '/admin/timetable/delete',
    method: 'DELETE',
    params: data,
  });
}
//修改课程
export function timetableSave(data) {
  return request({
    url: '/admin/timetable/update',
    method: 'POST',
    data,
  });
}
//房间信息
export function roomList(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/room/roomList',
    method: 'get',
    params: data,
  });
}


//修改课程
export function addSave(data) {
  return request({
    url: '/admin/timetable/add',
    method: 'POST',
    data,
  });
}

export function appointmentTime(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointment/room/appointmentTime',
    method: 'get',
    params: data,
  });
}
